﻿@{
    ViewBag.Title = "重置密码";
}
<script type="text/javascript" src="@Url.Content("~/Content/Default/JS/jquery.validate.js")"> </script>
<script type="text/javascript" src="@Url.Content("~/Content/Default/JS/messages_zh.js")"> </script>
<script type="text/javascript">
    $().ready(function () {
        $('form').validate({
            rules: {
                Password: {
                    required: true,
                    minlength: 6
                },
                ConfirmPassword: {
                    required: true,
                    equalTo: "#Password"
                }
            },
            messages: {
                Password: {
                    required: "<i class='ui-tiptext-icon iconfont' id='iusername-error'  title='出错'>&#xf0155;</i><span  style='color:Red;'>请输入密码！</span>",
                    minlength: "<i class='ui-tiptext-icon iconfont' id='iusername-error'  title='出错'>&#xf0155;</i><span  style='color:Red;'>请输入6位以上密码！</span>"
                },
                ConfirmPassword: {
                    required: "<i class='ui-tiptext-icon iconfont' id='iusername-error'  title='出错'>&#xf0155;</i><span  style='color:Red;'>请再次输入密码！</span>",
                    equalTo: "<i class='ui-tiptext-icon iconfont' id='iusername-error'  title='出错'>&#xf0155;</i><span  style='color:Red;'>两次密码不相同！</span>"
                }
            },
            errorPlacement: function (error, element) {
                if (element.is("#Password")) {
                    error.appendTo('#password-error');
                }
                else if (element.is("#ConfirmPassword")) {
                    error.appendTo('#confirmpassword-error');
                }
                else if (element.is("#Validate")) {
                    error.appendTo('#validate-error');
                }
            }
        });
    });
</script>
<div class="ui-body">
    <div class="ui-inner">
        <div class="ui-title">
            <h1><i class="iconfont">&#xe624;</i> 找回密码</h1>
            <div class="triangle"></div>
        </div>
        <div class="ui-box">
            <div class="ui-box-step">
               <ol class="ui-step ui-step-4">
                    <li class="ui-step-start ui-step-done">
                        <div class="ui-step-line">-</div>
                        <div class="ui-step-icon">
                            <i class="iconfont">&#xe610;</i>
                            <i class="ui-step-number">1</i>
                            <span class="ui-step-text">输入账户名</span>
                        </div>
                    </li>
                    <li class="ui-step-done">
                        <div class="ui-step-line ">-</div>
                        <div class="ui-step-icon">
                            <i class="iconfont">&#xe610;</i>
                            <i class="ui-step-number">2</i>
                            <span class="ui-step-text">验证账户名</span>
                        </div>
                    </li>
                    <li class=" ui-step-active">
                        <div class="ui-step-line">-</div>
                        <div class="ui-step-icon">
                            <i class="iconfont">&#xe610;</i>
                            <i class="ui-step-number">2</i>
                            <span class="ui-step-text">重置密码</span>
                        </div>
                    </li>
                    <li class="ui-step-end">
                        <div class="ui-step-line">-</div>
                        <div class="ui-step-icon">
                            <i class="iconfont">&#xe610;</i>
                            <i class="ui-step-number">&#xf00b2;</i>
                            <span class="ui-step-text">完成</span>
                        </div>
                    </li>
                </ol>
            </div>
             @using (Html.BeginForm("ResetPassword", "Account", FormMethod.Post, new { @class = "ui-form" }))
             {
                <input type="hidden" name="validate" value="@ViewData["ValidCode"]"/>
                <div class="ui-form-item">
                    <label for="" class="ui-label"><span class="ui-form-required">*</span>密码</label>
                    <input class="ui-input ui-input-large" type="password" id="Password" name="Password"/>
                     <p id="password-error"class="ui-form-explain ui-tiptext ui-tiptext-error"></p>
                </div>

                <div class="ui-form-item">
                    <label for="" class="ui-label"><span class="ui-form-required">*</span>确认密码</label>
                    <input class="ui-input ui-input-large" type="password" id="ConfirmPassword" name="ConfirmPassword"/>
                    <p id="confirmpassword-error"class="ui-form-explain ui-tiptext ui-tiptext-error"></p>
                </div>

                 <div class="ui-form-item">
                    <input type="submit" id="submit"  class="ui-button ui-button-orange big" value="确定"/>
                </div>
             }
        </div>
    </div>
</div>
